package com.qf.service.impl;

import com.qf.mapper.TypeMapper;
import com.qf.pojo.Type;
import com.qf.service.TypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TypeServiceImpl implements TypeService {

    @Resource
    private TypeMapper typeMapper;

    @Override
    public List<Type> getTypes1() {
        return typeMapper.getAllC1Types();
    }

    @Override
    public List<Type> getTypes2(Integer info2) {
        return typeMapper.getAllC2Types(info2);
    }

    @Override
    public List<Type> getTypes3(Integer info2, Integer parent) {
        return typeMapper.getAllC3Types(info2,parent);
    }

    //新增一个类型
    @Override
    public int add(Type type) {
        return typeMapper.add(type);
    }
}
